package com.huyang.thread;

public class ThreadTest2 implements Runnable{
	
	int i;
	@Override
	public void run() {
		int i =0;
		while(true){
			System.out.println(i++);
			try {
				Thread.sleep((long)Math.random()*1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
            if(i>50){			
            	break;
            }
		}
	}
}
